package com.jacken.mars.controller.monitor;

import com.jacken.mars.commons.annotation.BaseAnnotationNote;
import com.jacken.mars.entity.resp.R;
import com.jacken.mars.entity.system.Server;
import lombok.Data;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version: 2.4.5
 * @author: wq
 * @time: 2021/2/5 10:39
 */
@RestController
@RequestMapping("admin/monitor")
public class ServerController {


    /**
     * 服务监控
     *
     * @return
     * @throws Exception
     */
    @GetMapping("/server")
    @BaseAnnotationNote
    public R getInfo() throws Exception {
        Server server = new Server();
        server.start();
        return R.success(server);
    }
}
